# FIND_PACKAGE( CityGML REQUIRED )

IF ( LIBCITYGML_USE_XERCESC )
	FIND_PACKAGE( XERCES REQUIRED )
	ADD_DEFINITIONS( -DUSE_XERCESC )
	SET( LIBXML2_INCLUDE_DIR "" )
	SET( LIBXML2_LIBRARIES "" )
ENDIF( LIBCITYGML_USE_XERCESC )

IF( LIBCITYGML_USE_LIBXML2 )
	FIND_PACKAGE( LibXml2 REQUIRED )
	ADD_DEFINITIONS( -DUSE_LIBXML2 )
	ADD_DEFINITIONS( ${LIBXML2_DEFINITIONS} )
	SET( XERCESC_INCLUDE "" )
	SET( XERCESC_LIBRARY "" )
ENDIF( LIBCITYGML_USE_LIBXML2 )

FIND_PACKAGE( GLU REQUIRED )

if(COMMAND cmake_policy)
	cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

IF( LIBCITYGML_STATIC )
	ADD_DEFINITIONS( -DLIBCITYGML_STATIC )
ENDIF( LIBCITYGML_STATIC )

IF( LIBCITYGML_DYNAMIC )
	ADD_DEFINITIONS( -DLIBCITYGML_DYNAMIC )
ENDIF( LIBCITYGML_DYNAMIC )

# INCLUDE_DIRECTORIES( ${CITYGML_INCLUDE_DIR} )
INCLUDE_DIRECTORIES( ../include )

SET( PRG_SRCS citygmltest.cpp )

ADD_EXECUTABLE( citygmltest ${PRG_SRCS} )

IF( MSVC_IDE )
	SET_TARGET_PROPERTIES( citygmltest PROPERTIES PREFIX "../" )
ENDIF( MSVC_IDE )

TARGET_LINK_LIBRARIES( citygmltest citygml ${XERCESC_LIBRARY} ${LIBXML2_LIBRARIES} ${GLU_LIBRARY} )
